#pragma once
#include"RBTree2.h"
namespace hjc
{
	template<class K>
	class myset
	{
		struct SetKeyofT
		{
			const K& operator()(const K& key)
			{
				return key;
			}
		};

	public:
		typedef typename RBTree<K, const K, SetKeyofT>::Iterator iterator;
		typedef typenaem RBTree<K, const K, SetKeyofT>::ConstIterator const_iterator;

		iterator begin()
		{
			return _rbtree.Begin();
		}

		iterator end()
		{
			return _rbtree.End();
		}

		const_iterator begin() const
		{
			return _rbtree.Begin();
		}

		const_iterator end() const
		{
			return _rbtree.End();
		}

		pair<iterator, bool> Insert(const K& key)
		{
			return _rbtree.Insert(key);
		}

		iterator Find(const K& key)
		{
			return _rbtree.Find(key);
		}

	private:
		RBTree<K, const K, SetKeyofT> _rbtree;
	};
}